﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master"
 AutoEventWireup="true" CodeBehind="LockedUsers.aspx.cs" Inherits="Nivdal.LockedUsers" Theme="SkinFile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitle1" runat="server" Text="Locked users" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    

    <asp:FormView ID="StatsFormView" runat="server" DataSourceID="LockedUsersStatsDataSource">
    <ItemTemplate>
        <asp:Label ID="NumSuspendedUsersTitleLabel" runat="server" Text="Number of suspended users: " SkinID="InfoLabel"></asp:Label>
        <asp:Label ID="NumSuspendedUsersLabel" runat="server" Text='<%# Eval("NumSuspendedUsers") %>' SkinID="GridLabel"></asp:Label>
        <br />
        <asp:Label ID="NumCheatersTitleLabel" runat="server" Text="Suspended transfer market cheaters: " SkinID="InfoLabel"></asp:Label>
        <asp:Label ID="NumCheatersLabel" runat="server" Text='<%# Eval("NumSuspendedCheaters") %>' SkinID="GridLabel"></asp:Label>
        <br />
        <asp:Label ID="NumBankruptsTitleLabel" runat="server" Text="Number of bankrupts: " SkinID="InfoLabel"></asp:Label>
        <asp:Label ID="NumBankruptsLabel" runat="server" Text='<%# Eval("NumBankrupts") %>' SkinID="GridLabel"></asp:Label>
    </ItemTemplate>
    </asp:FormView>
    
    <asp:GridView ID="LockedUsersGrid" AllowPaging="true" PageSize="50" DataSourceID="LockedUsersDataSourse"
     SkinID="BigProfessional" AutoGenerateColumns="false" runat="server">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField HeaderText="User" ItemStyle-Width="35%">
            <ItemTemplate>
                <asp:HyperLink ID="UserHyerlink" runat="server" NavigateUrl='<%# "~/UserPage.aspx?Id=" + Eval("UserId") %>'
                 Text='<%# Eval("PublicName") %>' SkinID="GreenTitleHyperLink"></asp:HyperLink>
            </ItemTemplate>            
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Team" ItemStyle-Width="35%">
            <ItemTemplate>
                <asp:HyperLink ID="TeamHyperlink" runat="server" NavigateUrl='<%# "~/TeamHomePage.aspx?TeamId=" + Eval("TeamId") %>'
                 Text='<%# Eval("TeamName") %>' SkinID="GreenTitleHyperLink"></asp:HyperLink>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-Width="10%">
            <HeaderTemplate>
                <asp:Label ID="TotalLoginsHeaderLabelLabel" runat="server" Text="Logins" ToolTip="Total logins since sign up"></asp:Label>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="TotalLoginsLabel" runat="server" Text='<%# Eval("TotalLogins") %>' ToolTip="Total logins since sign up"
                 SkinID="GridLabel"></asp:Label>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-Width="10%">
            <HeaderTemplate>
                <asp:Label ID="LastMonthLoginsTitleLabel" runat="server" Text="last month" ToolTip="number of logins last month"></asp:Label>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="LastMonthLoginsLabel" runat="server" Text='<%# Eval("LoginsLastMonth") %>' SkinID="GridLabel"></asp:Label>
            </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-Width="10%">
            <ItemTemplate>
                <asp:Image ID="IsCheaterImage" runat="server" ImageUrl="~/Images/Icons/Friendship_Blacklist.jpg"
                 Visible='<%# Eval("Cheater") %>' ToolTip="User was marked as a transfer market chater"  />
            </ItemTemplate>
            </asp:TemplateField>


        </Columns>    
    </asp:GridView>

    <asp:SqlDataSource ID="LockedUsersDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowLockedUsers" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
     <asp:SqlDataSource ID="LockedUsersStatsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetLockedUsersStats" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="Locked users" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
